import http from "../util/http";

export function autoSearch(keyword) {
    return new Promise((resolve, reject) => {
        http.post("search", {keyword: keyword}).then(res => {
            if (res.success === true) {
                resolve(res.data);
            } else {
                reject(res.msg);
            }
        }).catch(res => {
            console.log(res);
        });
    });
}
